package com.corpgovernment.common.enums;

import java.util.Arrays;

/**
 * @author wangyujue
 */
public enum IFlightQuoteEnum {
    NEW("new", "新建"),
    SELECTED("selected", "已选择"),
    NOT_SELECTED("not_selected", "未选择"),
    ;

    IFlightQuoteEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    private String code;
    private String desc;

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static IFlightQuoteEnum selectByCode(String code) {
        return Arrays.stream(IFlightQuoteEnum.values()).filter(p -> p.getCode().equalsIgnoreCase(code)).findFirst().orElse(null);
    }
}
